<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      @import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap");

      *,
      *:after,
      *:before {
        box-sizing: border-box;
      }

      body {
        font-family: "Inter", sans-serif;
        line-height: 1.5;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background-color: #fefefe;
      }

      img {
        display: block;
        max-width: 100%;
      }

      .stack {
        width: 85%;
        max-width: 400px;
        transition: 0.25s ease;
      }
      .stack:hover {
        transform: rotate(5deg);
      }
      .stack .card:before {
        transform: translatey(-2%) rotate(-4deg);
      }
      .stack .card:after {
        transform: translatey(2%) rotate(4deg);
      }
      .card :before,
      .card :after {
        content: "";
        display: block;
        position: absolute;
        height: 100%;
        width: 100%;
        border: 4px solid;
        background-color: #fff;
        transform-origin: center center;
        z-index: -1;
        transition: 0.15s ease;
        top: 0;
        left: 0;
      }
      .card {
        aspect-ratio: 3 / 2;
        border: 4px solid;
        background-color: #fff;
        position: relative;
        transition: 0.15s ease;
        cursor: pointer;
        padding: 5% 5% 15% 5%;
      }
      .card :before {
        transform: translatey(-2%) rotate(-6deg);
      }

      .card :after {
        transform: translatey(2%) rotate(6deg);
      }
      .image {
        width: 100%;
        border: 4px solid;
        background-color: #eee;
        aspect-ratio: 1 / 1;
        position: relative;
      }

      .browser-warning {
        margin-bottom: 4rem;
      }

      @supports (aspect-ratio: 1 / 1) {
        .browser-warning {
          display: none;
        }
      }
    </style>
  </head>
  <body>
    <p class="browser-warning">
      If this looks wonky to you it's because this browser doesn't support the
      CSS property 'aspect-ratio'.
    </p>
    <div class="stack">
      <div class="card">
        <div class="image">
          <img
            src=""
            alt=""
          />
        </div>
      </div>
    </div>
  </body>
</html>
